//
//  TBPasteboardSearchErrView.swift
//  LeGou
//
//  Created by 刘亿前 on 2022/9/21.
//

import UIKit

class TBPasteboardSearchErrView: XMBaseView {

    @IBOutlet weak var name: UILabel!
    
    @IBOutlet weak var searchBtn: UIButton!
    
    @IBOutlet weak var linkBtn: UIButton!
    let disposeBag = DisposeBag()
    
    override func awakeFromNib() {
        super.awakeFromNib()
        bindAction()
    }
    
    func setUI(_ str: String) {
        name.text = str
    }
    
    // MARK: - bindAction
    func bindAction() {
        searchBtn.rx.tap.subscribe(onNext:{ [unowned self] resp in
            self.removeFromSuperview()
            UIApplication.zm.visibleNavigationController().pushViewController(ZMSearchVC(), animated: true)
        }).disposed(by: disposeBag)
        
        linkBtn.rx.tap.subscribe(onNext:{ [unowned self] resp in
            self.removeFromSuperview()
            router.push("xm://main/Home/change_link")
        }).disposed(by: disposeBag)
    }
}
